package models;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

@Entity
public class TransferPrice extends BaseEntity {

//运输起点城市
@ManyToOne
public City startCity;

//运输终点城市
@ManyToOne
public City endCity;

//公有起价
public Double publicBasePrice;

//公有续价
public Double publicRenewalPrice; 

//私有起价
public Double privateBasePrice;

//私有续价
public Double privateRenewalPrice; 

//公有起始重量
public Double publicBaseWeight;

//私有起始重量
public Double privateBaseWeight; 

//私有总价
@Transient
public Double privateTotalPrice;

//公有总价
@Transient
public Double publicTotalPrice;

//所属运输公司
@ManyToOne(fetch = FetchType.EAGER)
public TransferCompany company;
}
